package com.molichuxing.services.business.service;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.framework.service.RootService;
import com.molichuxing.services.business.dto.request.create.DealerBizCreateDto;
import com.molichuxing.services.business.dto.request.modify.DealerBizModifyDto;
import com.molichuxing.services.business.dto.response.DealerBizDto;
import com.molichuxing.services.business.dto.response.DealerDetailInfoBizDto;
import com.molichuxing.services.business.dto.response.DealerInfoBizDto;
import com.molichuxing.services.business.dto.response.DealerStoreBizDto;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 经销商组合 服务类
 * </p>
 *
 * @author
 * @since 2019-08-12
 */
public interface DealerBizService extends RootService {


    /**
     * 获取经销商信息分页列表
     *
     * @param map      key:status Integer 营业状态
     *                 key:shortName String 经销商名称
     *                 key：regionId Integer 区域ID
     *                 key:startCreateTime LocalDateTime 创建开始时间
     *                 key:endCreateTime LocalDateTime 创建结束时间
     * @param pageNum
     * @param pageSize
     * @return
     */
    Paged<DealerBizDto> getDealerPage(Map<String, Object> map, Integer pageNum, Integer pageSize) throws Exception;

    /**
     * 编辑经销商信息
     *
     * @param dealerBusModifyDto
     * @return
     * @throws Exception
     */
    Boolean modifyDealer(DealerBizModifyDto dealerBusModifyDto) throws Exception;

    /**
     * 添加经销商
     *
     * @param dealerBusCreateDto
     * @return
     * @throws Exception
     */
    Integer createDealer(DealerBizCreateDto dealerBusCreateDto) throws Exception;

    /**
     * 详情-获取经销商基础信息
     *
     * @param dealerId
     * @return
     * @throws Exception
     */
    DealerInfoBizDto getDealerInfo(Integer dealerId) throws Exception;

    /**
     * 详情-获取经销商详情信息
     *
     * @param dealerId
     * @return
     * @throws Exception
     */
    DealerDetailInfoBizDto getDealerDetailInfo(Integer dealerId) throws Exception;

    /**
     * 编辑经销商状态
     *
     * @param dealerId
     * @param status
     * @return
     * @throws Exception
     */
    Boolean modifyDealerStatus(Integer dealerId, Integer status) throws Exception;

    /**
     * 经销商门店联动
     *
     * @return
     * @throws Exception
     */
    List<DealerStoreBizDto> getDealerStore(Integer status, Integer type, Integer dealerId, Boolean dealerIsShow) throws Exception;

    /**
     * 通过门店id获取经销商信息
     *
     * @param storeId
     * @return
     * @throws Exception
     */
    DealerDetailInfoBizDto getDealerByStoreId(Integer storeId) throws Exception;
}
